using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VPRFRK
    {
        public DataRow Convert2PRFRK(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryPRFRK(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["PRKMANDANT"] = " ".PadRight(2 ); 
         dwReturn["PRKLO"] = " ".PadRight(2 ); 
         dwReturn["PRKLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["PRKVERSART"] = " ".PadRight(3 ); 
         dwReturn["PRKLAND"] = " ".PadRight(3 ); 
         dwReturn["PRKPLZ"] = " ".PadRight(12 ); 
         dwReturn["PRKAENZL"] = " ".PadRight(0 ); 
         dwReturn["PRKAENB"] = " ".PadRight(8 ); 
         dwReturn["PRKAEND"] = " ".PadRight(0 ); 
         dwReturn["PRKNEUB"] = " ".PadRight(8 ); 
         dwReturn["PRKNEUD"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT1"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB1"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE1"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB1"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT2"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB2"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE2"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB2"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT3"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB3"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE3"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB3"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT4"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB4"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE4"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB4"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT5"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB5"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE5"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB5"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT6"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB6"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE6"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB6"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT7"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB7"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE7"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB7"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT8"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB8"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE8"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB8"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT9"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB9"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE9"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB9"] = " ".PadRight(0 ); 
         dwReturn["PRKFRWERT10"] = " ".PadRight(0 ); 
         dwReturn["PRKFRPB10"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMENGE10"] = " ".PadRight(0 ); 
         dwReturn["PRKFRAB10"] = " ".PadRight(0 ); 
         dwReturn["PRKFRMEEH"] = " ".PadRight(3 ); 
         dwReturn["PRKVPWERT1"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB1"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE1"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB1"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT2"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB2"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE2"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB2"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT3"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB3"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE3"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB3"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT4"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB4"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE4"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB4"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT5"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB5"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE5"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB5"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT6"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB6"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE6"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB6"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT7"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB7"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE7"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB7"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT8"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB8"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE8"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB8"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT9"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB9"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE9"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB9"] = " ".PadRight(0 ); 
         dwReturn["PRKVPWERT10"] = " ".PadRight(0 ); 
         dwReturn["PRKVPPB10"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMENGE10"] = " ".PadRight(0 ); 
         dwReturn["PRKVPAB10"] = " ".PadRight(0 ); 
         dwReturn["PRKVPMEEH"] = " ".PadRight(3 ); 
         dwReturn["PRKMINFR"] = " ".PadRight(0 ); 
         dwReturn["PRKVERSICH"] = " ".PadRight(0 ); 
         dwReturn["PRKFILLER"] = " ".PadRight(55 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapPRFRK(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SavePRFRK(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryPRFRK(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapPRFRK(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertPRFRK(dwLocal, ITXDBVERSION);
            }
            UpdatePRFRK(dwLocal);
        }
        public void InsertPRFRK(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO PRFRK(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryPRFRK(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM PRFRK WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM PRFRK  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "PRFRK";
            Return = Result;
            return Return;
        }
        public void DeletePRFRK(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM PRFRK   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdatePRFRK(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE PRFRK SET "
                    +"PRKMANDANT= :PRKMANDANT,"
                    +"PRKLO= :PRKLO,"
                    +"PRKLIEFBED= :PRKLIEFBED,"
                    +"PRKVERSART= :PRKVERSART,"
                    +"PRKLAND= :PRKLAND,"
                    +"PRKPLZ= :PRKPLZ,"
                    +"PRKAENZL= :PRKAENZL,"
                    +"PRKAENB= :PRKAENB,"
                    +"PRKAEND= :PRKAEND,"
                    +"PRKNEUB= :PRKNEUB,"
                    +"PRKNEUD= :PRKNEUD,"
                    +"PRKFRWERT1= :PRKFRWERT1,"
                    +"PRKFRPB1= :PRKFRPB1,"
                    +"PRKFRMENGE1= :PRKFRMENGE1,"
                    +"PRKFRAB1= :PRKFRAB1,"
                    +"PRKFRWERT2= :PRKFRWERT2,"
                    +"PRKFRPB2= :PRKFRPB2,"
                    +"PRKFRMENGE2= :PRKFRMENGE2,"
                    +"PRKFRAB2= :PRKFRAB2,"
                    +"PRKFRWERT3= :PRKFRWERT3,"
                    +"PRKFRPB3= :PRKFRPB3,"
                    +"PRKFRMENGE3= :PRKFRMENGE3,"
                    +"PRKFRAB3= :PRKFRAB3,"
                    +"PRKFRWERT4= :PRKFRWERT4,"
                    +"PRKFRPB4= :PRKFRPB4,"
                    +"PRKFRMENGE4= :PRKFRMENGE4,"
                    +"PRKFRAB4= :PRKFRAB4,"
                    +"PRKFRWERT5= :PRKFRWERT5,"
                    +"PRKFRPB5= :PRKFRPB5,"
                    +"PRKFRMENGE5= :PRKFRMENGE5,"
                    +"PRKFRAB5= :PRKFRAB5,"
                    +"PRKFRWERT6= :PRKFRWERT6,"
                    +"PRKFRPB6= :PRKFRPB6,"
                    +"PRKFRMENGE6= :PRKFRMENGE6,"
                    +"PRKFRAB6= :PRKFRAB6,"
                    +"PRKFRWERT7= :PRKFRWERT7,"
                    +"PRKFRPB7= :PRKFRPB7,"
                    +"PRKFRMENGE7= :PRKFRMENGE7,"
                    +"PRKFRAB7= :PRKFRAB7,"
                    +"PRKFRWERT8= :PRKFRWERT8,"
                    +"PRKFRPB8= :PRKFRPB8,"
                    +"PRKFRMENGE8= :PRKFRMENGE8,"
                    +"PRKFRAB8= :PRKFRAB8,"
                    +"PRKFRWERT9= :PRKFRWERT9,"
                    +"PRKFRPB9= :PRKFRPB9,"
                    +"PRKFRMENGE9= :PRKFRMENGE9,"
                    +"PRKFRAB9= :PRKFRAB9,"
                    +"PRKFRWERT10= :PRKFRWERT10,"
                    +"PRKFRPB10= :PRKFRPB10,"
                    +"PRKFRMENGE10= :PRKFRMENGE10,"
                    +"PRKFRAB10= :PRKFRAB10,"
                    +"PRKFRMEEH= :PRKFRMEEH,"
                    +"PRKVPWERT1= :PRKVPWERT1,"
                    +"PRKVPPB1= :PRKVPPB1,"
                    +"PRKVPMENGE1= :PRKVPMENGE1,"
                    +"PRKVPAB1= :PRKVPAB1,"
                    +"PRKVPWERT2= :PRKVPWERT2,"
                    +"PRKVPPB2= :PRKVPPB2,"
                    +"PRKVPMENGE2= :PRKVPMENGE2,"
                    +"PRKVPAB2= :PRKVPAB2,"
                    +"PRKVPWERT3= :PRKVPWERT3,"
                    +"PRKVPPB3= :PRKVPPB3,"
                    +"PRKVPMENGE3= :PRKVPMENGE3,"
                    +"PRKVPAB3= :PRKVPAB3,"
                    +"PRKVPWERT4= :PRKVPWERT4,"
                    +"PRKVPPB4= :PRKVPPB4,"
                    +"PRKVPMENGE4= :PRKVPMENGE4,"
                    +"PRKVPAB4= :PRKVPAB4,"
                    +"PRKVPWERT5= :PRKVPWERT5,"
                    +"PRKVPPB5= :PRKVPPB5,"
                    +"PRKVPMENGE5= :PRKVPMENGE5,"
                    +"PRKVPAB5= :PRKVPAB5,"
                    +"PRKVPWERT6= :PRKVPWERT6,"
                    +"PRKVPPB6= :PRKVPPB6,"
                    +"PRKVPMENGE6= :PRKVPMENGE6,"
                    +"PRKVPAB6= :PRKVPAB6,"
                    +"PRKVPWERT7= :PRKVPWERT7,"
                    +"PRKVPPB7= :PRKVPPB7,"
                    +"PRKVPMENGE7= :PRKVPMENGE7,"
                    +"PRKVPAB7= :PRKVPAB7,"
                    +"PRKVPWERT8= :PRKVPWERT8,"
                    +"PRKVPPB8= :PRKVPPB8,"
                    +"PRKVPMENGE8= :PRKVPMENGE8,"
                    +"PRKVPAB8= :PRKVPAB8,"
                    +"PRKVPWERT9= :PRKVPWERT9,"
                    +"PRKVPPB9= :PRKVPPB9,"
                    +"PRKVPMENGE9= :PRKVPMENGE9,"
                    +"PRKVPAB9= :PRKVPAB9,"
                    +"PRKVPWERT10= :PRKVPWERT10,"
                    +"PRKVPPB10= :PRKVPPB10,"
                    +"PRKVPMENGE10= :PRKVPMENGE10,"
                    +"PRKVPAB10= :PRKVPAB10,"
                    +"PRKVPMEEH= :PRKVPMEEH,"
                    +"PRKMINFR= :PRKMINFR,"
                    +"PRKVERSICH= :PRKVERSICH,"
                    +"PRKFILLER= :PRKFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("PRKMANDANT", OracleType.NVarChar).Value = dwData["PRKMANDANT"].ToString(); 
          or1.Parameters.Add("PRKLO", OracleType.NVarChar).Value = dwData["PRKLO"].ToString(); 
          or1.Parameters.Add("PRKLIEFBED", OracleType.NVarChar).Value = dwData["PRKLIEFBED"].ToString(); 
          or1.Parameters.Add("PRKVERSART", OracleType.NVarChar).Value = dwData["PRKVERSART"].ToString(); 
          or1.Parameters.Add("PRKLAND", OracleType.NVarChar).Value = dwData["PRKLAND"].ToString(); 
          or1.Parameters.Add("PRKPLZ", OracleType.NVarChar).Value = dwData["PRKPLZ"].ToString(); 
          or1.Parameters.Add("PRKAENZL", OracleType.NVarChar).Value = dwData["PRKAENZL"].ToString(); 
          or1.Parameters.Add("PRKAENB", OracleType.NVarChar).Value = dwData["PRKAENB"].ToString(); 
          or1.Parameters.Add("PRKAEND", OracleType.NVarChar).Value = dwData["PRKAEND"].ToString(); 
          or1.Parameters.Add("PRKNEUB", OracleType.NVarChar).Value = dwData["PRKNEUB"].ToString(); 
          or1.Parameters.Add("PRKNEUD", OracleType.NVarChar).Value = dwData["PRKNEUD"].ToString(); 
          or1.Parameters.Add("PRKFRWERT1", OracleType.NVarChar).Value = dwData["PRKFRWERT1"].ToString(); 
          or1.Parameters.Add("PRKFRPB1", OracleType.NVarChar).Value = dwData["PRKFRPB1"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE1", OracleType.NVarChar).Value = dwData["PRKFRMENGE1"].ToString(); 
          or1.Parameters.Add("PRKFRAB1", OracleType.NVarChar).Value = dwData["PRKFRAB1"].ToString(); 
          or1.Parameters.Add("PRKFRWERT2", OracleType.NVarChar).Value = dwData["PRKFRWERT2"].ToString(); 
          or1.Parameters.Add("PRKFRPB2", OracleType.NVarChar).Value = dwData["PRKFRPB2"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE2", OracleType.NVarChar).Value = dwData["PRKFRMENGE2"].ToString(); 
          or1.Parameters.Add("PRKFRAB2", OracleType.NVarChar).Value = dwData["PRKFRAB2"].ToString(); 
          or1.Parameters.Add("PRKFRWERT3", OracleType.NVarChar).Value = dwData["PRKFRWERT3"].ToString(); 
          or1.Parameters.Add("PRKFRPB3", OracleType.NVarChar).Value = dwData["PRKFRPB3"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE3", OracleType.NVarChar).Value = dwData["PRKFRMENGE3"].ToString(); 
          or1.Parameters.Add("PRKFRAB3", OracleType.NVarChar).Value = dwData["PRKFRAB3"].ToString(); 
          or1.Parameters.Add("PRKFRWERT4", OracleType.NVarChar).Value = dwData["PRKFRWERT4"].ToString(); 
          or1.Parameters.Add("PRKFRPB4", OracleType.NVarChar).Value = dwData["PRKFRPB4"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE4", OracleType.NVarChar).Value = dwData["PRKFRMENGE4"].ToString(); 
          or1.Parameters.Add("PRKFRAB4", OracleType.NVarChar).Value = dwData["PRKFRAB4"].ToString(); 
          or1.Parameters.Add("PRKFRWERT5", OracleType.NVarChar).Value = dwData["PRKFRWERT5"].ToString(); 
          or1.Parameters.Add("PRKFRPB5", OracleType.NVarChar).Value = dwData["PRKFRPB5"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE5", OracleType.NVarChar).Value = dwData["PRKFRMENGE5"].ToString(); 
          or1.Parameters.Add("PRKFRAB5", OracleType.NVarChar).Value = dwData["PRKFRAB5"].ToString(); 
          or1.Parameters.Add("PRKFRWERT6", OracleType.NVarChar).Value = dwData["PRKFRWERT6"].ToString(); 
          or1.Parameters.Add("PRKFRPB6", OracleType.NVarChar).Value = dwData["PRKFRPB6"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE6", OracleType.NVarChar).Value = dwData["PRKFRMENGE6"].ToString(); 
          or1.Parameters.Add("PRKFRAB6", OracleType.NVarChar).Value = dwData["PRKFRAB6"].ToString(); 
          or1.Parameters.Add("PRKFRWERT7", OracleType.NVarChar).Value = dwData["PRKFRWERT7"].ToString(); 
          or1.Parameters.Add("PRKFRPB7", OracleType.NVarChar).Value = dwData["PRKFRPB7"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE7", OracleType.NVarChar).Value = dwData["PRKFRMENGE7"].ToString(); 
          or1.Parameters.Add("PRKFRAB7", OracleType.NVarChar).Value = dwData["PRKFRAB7"].ToString(); 
          or1.Parameters.Add("PRKFRWERT8", OracleType.NVarChar).Value = dwData["PRKFRWERT8"].ToString(); 
          or1.Parameters.Add("PRKFRPB8", OracleType.NVarChar).Value = dwData["PRKFRPB8"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE8", OracleType.NVarChar).Value = dwData["PRKFRMENGE8"].ToString(); 
          or1.Parameters.Add("PRKFRAB8", OracleType.NVarChar).Value = dwData["PRKFRAB8"].ToString(); 
          or1.Parameters.Add("PRKFRWERT9", OracleType.NVarChar).Value = dwData["PRKFRWERT9"].ToString(); 
          or1.Parameters.Add("PRKFRPB9", OracleType.NVarChar).Value = dwData["PRKFRPB9"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE9", OracleType.NVarChar).Value = dwData["PRKFRMENGE9"].ToString(); 
          or1.Parameters.Add("PRKFRAB9", OracleType.NVarChar).Value = dwData["PRKFRAB9"].ToString(); 
          or1.Parameters.Add("PRKFRWERT10", OracleType.NVarChar).Value = dwData["PRKFRWERT10"].ToString(); 
          or1.Parameters.Add("PRKFRPB10", OracleType.NVarChar).Value = dwData["PRKFRPB10"].ToString(); 
          or1.Parameters.Add("PRKFRMENGE10", OracleType.NVarChar).Value = dwData["PRKFRMENGE10"].ToString(); 
          or1.Parameters.Add("PRKFRAB10", OracleType.NVarChar).Value = dwData["PRKFRAB10"].ToString(); 
          or1.Parameters.Add("PRKFRMEEH", OracleType.NVarChar).Value = dwData["PRKFRMEEH"].ToString(); 
          or1.Parameters.Add("PRKVPWERT1", OracleType.NVarChar).Value = dwData["PRKVPWERT1"].ToString(); 
          or1.Parameters.Add("PRKVPPB1", OracleType.NVarChar).Value = dwData["PRKVPPB1"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE1", OracleType.NVarChar).Value = dwData["PRKVPMENGE1"].ToString(); 
          or1.Parameters.Add("PRKVPAB1", OracleType.NVarChar).Value = dwData["PRKVPAB1"].ToString(); 
          or1.Parameters.Add("PRKVPWERT2", OracleType.NVarChar).Value = dwData["PRKVPWERT2"].ToString(); 
          or1.Parameters.Add("PRKVPPB2", OracleType.NVarChar).Value = dwData["PRKVPPB2"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE2", OracleType.NVarChar).Value = dwData["PRKVPMENGE2"].ToString(); 
          or1.Parameters.Add("PRKVPAB2", OracleType.NVarChar).Value = dwData["PRKVPAB2"].ToString(); 
          or1.Parameters.Add("PRKVPWERT3", OracleType.NVarChar).Value = dwData["PRKVPWERT3"].ToString(); 
          or1.Parameters.Add("PRKVPPB3", OracleType.NVarChar).Value = dwData["PRKVPPB3"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE3", OracleType.NVarChar).Value = dwData["PRKVPMENGE3"].ToString(); 
          or1.Parameters.Add("PRKVPAB3", OracleType.NVarChar).Value = dwData["PRKVPAB3"].ToString(); 
          or1.Parameters.Add("PRKVPWERT4", OracleType.NVarChar).Value = dwData["PRKVPWERT4"].ToString(); 
          or1.Parameters.Add("PRKVPPB4", OracleType.NVarChar).Value = dwData["PRKVPPB4"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE4", OracleType.NVarChar).Value = dwData["PRKVPMENGE4"].ToString(); 
          or1.Parameters.Add("PRKVPAB4", OracleType.NVarChar).Value = dwData["PRKVPAB4"].ToString(); 
          or1.Parameters.Add("PRKVPWERT5", OracleType.NVarChar).Value = dwData["PRKVPWERT5"].ToString(); 
          or1.Parameters.Add("PRKVPPB5", OracleType.NVarChar).Value = dwData["PRKVPPB5"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE5", OracleType.NVarChar).Value = dwData["PRKVPMENGE5"].ToString(); 
          or1.Parameters.Add("PRKVPAB5", OracleType.NVarChar).Value = dwData["PRKVPAB5"].ToString(); 
          or1.Parameters.Add("PRKVPWERT6", OracleType.NVarChar).Value = dwData["PRKVPWERT6"].ToString(); 
          or1.Parameters.Add("PRKVPPB6", OracleType.NVarChar).Value = dwData["PRKVPPB6"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE6", OracleType.NVarChar).Value = dwData["PRKVPMENGE6"].ToString(); 
          or1.Parameters.Add("PRKVPAB6", OracleType.NVarChar).Value = dwData["PRKVPAB6"].ToString(); 
          or1.Parameters.Add("PRKVPWERT7", OracleType.NVarChar).Value = dwData["PRKVPWERT7"].ToString(); 
          or1.Parameters.Add("PRKVPPB7", OracleType.NVarChar).Value = dwData["PRKVPPB7"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE7", OracleType.NVarChar).Value = dwData["PRKVPMENGE7"].ToString(); 
          or1.Parameters.Add("PRKVPAB7", OracleType.NVarChar).Value = dwData["PRKVPAB7"].ToString(); 
          or1.Parameters.Add("PRKVPWERT8", OracleType.NVarChar).Value = dwData["PRKVPWERT8"].ToString(); 
          or1.Parameters.Add("PRKVPPB8", OracleType.NVarChar).Value = dwData["PRKVPPB8"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE8", OracleType.NVarChar).Value = dwData["PRKVPMENGE8"].ToString(); 
          or1.Parameters.Add("PRKVPAB8", OracleType.NVarChar).Value = dwData["PRKVPAB8"].ToString(); 
          or1.Parameters.Add("PRKVPWERT9", OracleType.NVarChar).Value = dwData["PRKVPWERT9"].ToString(); 
          or1.Parameters.Add("PRKVPPB9", OracleType.NVarChar).Value = dwData["PRKVPPB9"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE9", OracleType.NVarChar).Value = dwData["PRKVPMENGE9"].ToString(); 
          or1.Parameters.Add("PRKVPAB9", OracleType.NVarChar).Value = dwData["PRKVPAB9"].ToString(); 
          or1.Parameters.Add("PRKVPWERT10", OracleType.NVarChar).Value = dwData["PRKVPWERT10"].ToString(); 
          or1.Parameters.Add("PRKVPPB10", OracleType.NVarChar).Value = dwData["PRKVPPB10"].ToString(); 
          or1.Parameters.Add("PRKVPMENGE10", OracleType.NVarChar).Value = dwData["PRKVPMENGE10"].ToString(); 
          or1.Parameters.Add("PRKVPAB10", OracleType.NVarChar).Value = dwData["PRKVPAB10"].ToString(); 
          or1.Parameters.Add("PRKVPMEEH", OracleType.NVarChar).Value = dwData["PRKVPMEEH"].ToString(); 
          or1.Parameters.Add("PRKMINFR", OracleType.NVarChar).Value = dwData["PRKMINFR"].ToString(); 
          or1.Parameters.Add("PRKVERSICH", OracleType.NVarChar).Value = dwData["PRKVERSICH"].ToString(); 
          or1.Parameters.Add("PRKFILLER", OracleType.NVarChar).Value = dwData["PRKFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
